/*
 * ./src/struct.h
 * Copyright (C) 2009 alexises
 * 
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <http://www.gnu.org/licenses/>.
 */
#ifndef STRUCT_H
#define STRUCT_H
#include <libircclient/libircclient.h>
#include <string.h>
struct donnee_de_control;
typedef struct donnee_de_control donnee_de_control;
typedef struct config config;
struct config {
	char *pseudo;
	char *chan;
	char *server;
	char *password;
	int port;
	int temps_timeout;
	char *pseudo_leader;
	char token;
	char *def_cat;
};

typedef struct trie_commandes_t trie_commandes_t;
struct trie_commandes_t {
	char *nom_commande;
	void (*callback) (donnee_de_control *, const char *, irc_session_t *, const char **, size_t);
	size_t taille_cmd;
	char *short_desc;
	char *long_desc;
};

typedef struct participent participent;
struct participent {
	char pseudo[30];
	int points;
	int main;
	struct participent *joueur_suivent;
};

struct donnee_de_control {
	char pseudo_leader[30];
	char pseudo_compteur[30];
	char *pseudo_joueur_leader;
	char *pseudo_a_kicker;
	char *raison_du_kick;
	char *mot_a_deviner;
	int inscription_ouverte;
	int parti_en_cour;
	int nb_inscrits;
	int compteur_mot;
	int nb_passer;
	int leader;
	int timeout;
	int recherche_pseudo_kick;
	int recherche_pseudo_ban;
	int password_valider;
	int nb_commandes;
	participent *joueurs;
	config *config_prog;
	trie_commandes_t *commandes;
};

#endif
